package com.bitters.core.exception;

import com.bitters.core.handler.ServerExceptionHandlerGroup;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author thomashe
 * @date 2023/10/20/ 16:37
 * @description 只拦截某一类型的异常信息
 */
@RestControllerAdvice(annotations = {ServerExceptionHandlerGroup.class})
public class ServerExceptionHandler {

    @ExceptionHandler(RuntimeException.class)
    public String handler() {
        return "ServerExceptionHandler 异常处理.";
    }
}
